A smart card is also referred to as a CPU card, and an integrated circuit on the card includes a microprocessor CPU, a storage unit, and a chip operating system (COS). A CPU card installing a COS is equivalent to a microcomputer, and not only has a data storage function but also has functions such as command processing and data security protection.
A conventional smart card read/write device reads/writes a smart card by packaging a control instruction by using an application protocol data unit (APDU), a communication unit between a smart card and a smart card reader. A predefined control instruction is related to an application corresponding to a smart card. If another application needs to read/write the smart card for the application, a software development kit (SDK) of the application corresponding to the smart card needs to be loaded.
For example, for some platform applications, if a platform application needs to integrate a function of reading/writing multiple smart cards, for example, the platform application needs to have a capability of reading/writing all of multiple smart cards such as a public transportation card, a meal card, and a shopping card, so that a user can perform a read/write operation on the multiple different smart cards only by installing a client of the platform application on a mobile phone, the client of the platform application needs to include an SDK corresponding to each supported smart card. If the platform application needs to extend services to support a function of reading/writing a new smart card, the client of the platform application on the mobile phone needs to be updated, and a corresponding SDK file needs to be added to an updated client.
Therefore, in conventional technologies, for a manner of reading/writing a smart card by a platform application that integrates a function of reading/writing multiple smart cards, a method for adding a function of reading/writing another smart card is excessively complex, in which an SDK file needs to be added and a client needs to be updated, leading to relatively poor extensibility.